Prefix Help

I apologize in advance for the simple question, but I'm learning on the fly.  I am trying to update a layout DXL attribute and I am having an issue.  In the column I am trying to display the object number.  Below is the code that is in place.  The code works fine except one thing.  Each of the items starts with the same prefix (in this case the first 4 characters are 1.1.)  I would like to remove these first 4 characters and only display the remaining numbering.  So instead of the number being 1.1.X.X.X, I would like to display X.X.X.  If anyone could suggest what can be added below to remove the prefix, I would greatly appreciate it.

 

Thanks.

 

string currPara(void) {

    string s = number(obj)
    int i
    bool dot = false

    for (i = 0; i < length(s); i++) {
        if ((s[i] == '0') && dot) {
            return(s[0:i-2])
        }
        dot = (s[i] == '.')
    }

    return s
}
display currPara()


billiam45 - Mon May 23 15:32:01 EDT 2016

Re: Prefix Help
DOORSHAM - Mon May 23 17:34:50 EDT 2016

Try:

string s = number(obj)

display s[  4  :  ]

Re: Prefix Help
billiam45 - Tue May 24 08:28:12 EDT 2016

That's it thank you.  I changed the last two lines of my code to include your change.

string currPara(void) {

    string s = number(obj)
    int i
    bool dot = false

    for (i = 0; i < length(s); i++) {
        if ((s[i] == '0') && dot) {
            return(s[0:i-2])
        }
        dot = (s[i] == '.')
    }

    return s
}
 

string s = currPara()

display s[  4  :  ]